console.log('script start');
async function async1() {
    await async2() // 视为同步任务
    console.log('async1 end'); //先被打入微任务队列
}
async function async2() {
    console.log('async2 end');
    setTimeout(() => {   //进宏任务队列
        console.log('setTimeout1');
    }, 0)
}
async1()
setTimeout(() => {
    console.log('setTimeout');//进宏任务队列
}, 0)
new Promise((resolve, reject) => {//同步任务
    console.log('promise');
    resolve()
})
    .then(() => {//进微任务队列
        console.log('then1');
    })
    .then(() => {//进微任务队列
        console.log('then2');
    });
console.log('script end');

//"D:\前端ai图片资料\await.png"
